<?php


/**
 * Notes:
 * PROJECT_NAME : ERP v1.8 重构erp
 * User: 夏鱼儿<397072174@qq.com>
 * Date: 2024/3/18
 * Time: 19:44
 */

namespace app\api\controller;

use app\admin\controller\BaseAdminController;
use app\api\model\GoodsCate;
use think\db\exception\DataNotFoundException;
use think\db\exception\DbException;
use think\db\exception\ModelNotFoundException;
use think\Response;

class Search extends BaseAdminController
{
    /**
     * @return Response
     * @throws DataNotFoundException
     * @throws DbException
     * @throws ModelNotFoundException
     */
    public function cate(): Response
    {
        $list = GoodsCate::where('pid', 0)->field('id,name,status')->where('status',1)->select();
        return $this->success('获取成功', $list);
    }

}